﻿@model IEnumerable<BskLeague.Models.AvaibleTerm>


<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>


<table>
    <tr>
        <th>
        lp.
         </th>
        <th>
            Godzina start
        </th>
        <th>
            Obiekt
        </th>
        <th></th>
    </tr>
    @{int i=1;}
@foreach (var item in Model)
{
    
        <tr>
        <td>
            @i
            @{
                i++;
                }
        </td>
        <td>
             @Html.DisplayFor(modelItem => item.time)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.stadiumName)
        </td>
        <td>
            @Ajax.ActionLink("Usuń", "Delete", "ScheduleGenerator", new { id = i-1 }, new AjaxOptions { UpdateTargetId = "Terms", HttpMethod = "Post", InsertionMode = InsertionMode.Replace })
        </td>
    </tr>
}

</table>
